#!/bin/bash

function ap {
  cordova plugin add org.apache.cordova.$1
}

ap camera
ap console
ap device
ap network-information
ap file
ap file-transfer
ap splashscreen
ap inappbrowser

# 20160229
sudo ionic plugin add cordova-plugin-whitelist
# 失败 换下一个 sudo cordova plugin add https://github.com/wildabeast/BarcodeScanner.git
sudo cordova plugin add phonegap-plugin-barcodescanner
# 失败 换下一个 sudo cordova plugin add https://github.com/apache/cordova-plugin-camera.git
sudo cordova plugin add cordova-plugin-camera
sudo cordova plugin add cordova-plugin-device
sudo cordova plugin add cordova-plugin-network-information
sudo cordova plugin add cordova-plugin-file
sudo cordova plugin add https://github.com/pwlin/cordova-plugin-file-opener2.git
sudo cordova plugin add cordova-plugin-file-transfer
# 失败 没有代替的啊!待处理 sudo cordova plugin add https://github.com/wymsee/cordova-imagePicker.git
sudo cordova plugin add cordova-plugin-inappbrowser
sudo cordova plugin add https://github.com/VitaliiBlagodir/cordova-plugin-datepicker.git
sudo cordova plugin add cordova-plugin-splashscreen

sudo cordova plugin add https://github.com/chrisekelley/AppPreferences

# sudo cordova plugin remove cordova-plugin-splashscreen
# add by wzh 20160302 本地通知
sudo cordova plugin add https://github.com/katzer/cordova-plugin-local-notifications.git
# add by wzh 20160307 键盘
sudo cordova plugin add  https://github.com/driftyco/ionic-plugins-keyboard.git
# add by wzh 20160307 原生提示
sudo cordova plugin add https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git

# by wzh 20160308 发现 app.js 中已经存在 cordova 的 keyboard处理! cordova.plugins.Keyboard
# 这样不行 sudo cordova plugin remove https://github.com/driftyco/ionic-plugins-keyboard.git
# 这样不行 sudo cordova plugin remove ionic-plugins-keyboard
# 这样子ok,remove plugins下面的目录名字,也就是他的plgin名字
sudo cordova plugin remove ionic-plugin-keyboard

## by wzh 20160308 联系人
sudo cordova plugin add org.apache.cordova.contacts

##
sudo cordova plugin add https://github.com/phonegap/ios-deploy

## 20160408 因为苹果审核问题,升级keyboard
sudo ionic plugin rm ionic-plugin-keyboard
sudo ionic plugin add ionic-plugin-keyboard

## 20160708 android 版本升级
sudo cordova plugin add https://github.com/whiteoctober/cordova-plugin-app-version.git

## 20160721 cordova加载层、进度条、文件选择插件--只有android
sudo cordova plugin add https://github.com/laden666666/cordovaDialogsPlus


